<div class="container-fluid" style="padding-top: 10px;">
    <div class="row">
        <div class="col-sm-12">
            总计 {$total} 条数据

            {volist name='list' id='vo'}
            <div style="padding-top: 10px;">
                <button START="{$vo.start}" LIMIT="{$vo.limit}" onclick="clickExport(this)" class="btn btn-sm btn-success">第{$vo.start+1}至{$vo.end}条数据</button>
            </div>
            {/volist}

        </div>
    </div>
</div>

<script>
    
    function clickExport(obj) {
        var start = $(obj).attr("START");
        var limit = $(obj).attr('LIMIT');
        var startDate = "{$startDate}";
        var endDate = "{$endDate}";
        var type = "{$type}";
        var belong = "{$belong}";

        if(type == '1'){
            var url = "{:url('report/exportLandForCZB')}?startDate=" + startDate
                + "&endDate=" + endDate + "&type=" + type + "&belong=" + belong
                + "&start=" + start + "&limit=" + limit;

            window.open(url);
        }

        if(type == '2'){
            var url = "{:url('report/exportFacilityForCZB')}?startDate=" + startDate
                + "&endDate=" + endDate + "&type=" + type + "&belong=" + belong
                + "&start=" + start + "&limit=" + limit;

            window.open(url);
        }

        if(type == '3'){
            var url = "{:url('report/exportFurnForCZB')}?startDate=" + startDate
                + "&endDate=" + endDate + "&type=" + type + "&belong=" + belong
                + "&start=" + start + "&limit=" + limit;

            window.open(url);
        }

        if(type == '4'){
            var url = "{:url('report/exportBuildingForCZB')}?startDate=" + startDate
                + "&endDate=" + endDate + "&type=" + type + "&belong=" + belong
                + "&start=" + start + "&limit=" + limit;

            window.open(url);
        }

    }
    
</script>